package com.stormrage.edu.serv.learn.impl;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.stormrage.edu.dao.learn.LeaBunchUsuaDao;
import com.stormrage.edu.serv.learn.LeaBunchUsuaServ;
import com.stormrage.entity.learn.LeaBunchUsua;
import com.stormragetech.core.exception.StormrageTechException;

/**   
* @Title: LeaBunchUsuaServImpl.java 
* @Package com.stormrage.edu.serv.learn.impl 
* @Description: 班级平时成绩 Service 
* @author www.stormragetech.com
* @date 2016年4月27日
* @version V1.0   
*/
@Service
public class LeaBunchUsuaServImpl implements LeaBunchUsuaServ {

	private static final Logger logger = LoggerFactory.getLogger(LeaBunchUsuaServImpl.class);

	@Autowired
	private LeaBunchUsuaDao leaBunchUsuaDao;

	@Override
	public Integer create(final LeaBunchUsua arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaBunchUsuaServ 】- 【 create 】- 开始运行 ");

		Integer index = leaBunchUsuaDao.create(arg0);

		logger.debug(" 【 Serv 】- 【 LeaBunchUsuaServ 】- 【 create 】- 结束运行 ");
		return index;

	}

	@Override
	public void update(final LeaBunchUsua arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaBunchUsuaServ 】- 【 update 】- 开始运行 ");

		leaBunchUsuaDao.update(arg0);

		logger.debug(" 【 Serv 】- 【 LeaBunchUsuaServ 】- 【 update 】- 结束运行 ");

	}

	@Override
	public LeaBunchUsua queryById(final Integer arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaBunchUsuaServ 】- 【 queryById 】- 开始运行 ");

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("id", arg0);

		LeaBunchUsua entity = leaBunchUsuaDao.queryById(map);

		logger.debug(" 【 Serv 】- 【 LeaBunchUsuaServ 】- 【 queryById 】- 结束运行 ");
		return entity;

	}

}
